<?php

declare(strict_types=1);
/**
 * FastApp.
 * 9/22/24
 * @Author deepsea159
 * @Contact telegram:deepsea159
 */

namespace App\Fastapp\Api\Controller\Account;


use App\Fastapp\Api\Controller\ApiController;
use App\Fastapp\Api\Service\Account\WalletLogService;
use App\Fastapp\Aspect\ApiAuth;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller(prefix: "api/walletLog"), ApiAuth]
class WalletLogController extends ApiController
{
    #[Inject]
    public WalletLogService $service;

    #[GetMapping('list')]
    public function list(): ResponseInterface
    {
        return $this->success($this->service->list($this->request->all()));
    }

    #[GetMapping('withdrawal')]
    public function withdrawal(): ResponseInterface
    {
        return $this->success($this->service->withdrawal($this->request->all()));
    }

    #[GetMapping('recharge')]
    public function recharge(): ResponseInterface
    {
        return $this->success($this->service->recharge($this->request->all()));
    }

    #[GetMapping('detail')]
    public function detail(): ResponseInterface
    {
        return $this->success($this->service->detail($this->request->all()));
    }
}